#!/usr/bin/env python
#coding=utf-8


#Warn in avahi: CVE-2017-6519 reported at 2017-03-07 00:00:00 after last commit 2016-08-12 20:25:50

import re

content_r = re.compile(r"Warn in (.*): (.*) reported at (.*) after last commit (.*)")

for line in open("warn_log3"):
    l=line.strip()
    res = content_r.findall(l)
    if len(res):
        module, cveid, cvereporttime, lastcommittime = res[0]
        print "{},{},{},{}".format(module, cveid, cvereporttime, lastcommittime)

